$(function() {
	layer.config({
	    extend: ['skin/fpxskin/style.css']  //加载弹出层皮肤
	});
	
	//普通
	$(".primaryBtn").on("click", function() {
		layer.open({
	        type: 1,
	        title: "提示",
	        skin: "skinprimarycss",
	        shadeClose: true, //点击遮罩关闭
	        //area: ['300px', '200px'],
	        content: '普通弹出层',
	        btn: ['确定', '取消']
			  ,yes: function(index, layero){
			   	layer.msg('普通弹出层', {
			   		icon: 1,   //1-info;2-success;3-warning;4-error
			   		offset: 'rb',
			   		skin: "skinprimarycss"
			   	});
			   	layer.close(index);  //回调关闭
			  },btn2: function(){ 
			  }
	    });
	});
	
	//成功
	$(".successBtn").on("click", function() {
		layer.open({
	        type: 1,
	        title: "提示",
	        skin: "skinsuccesscss",
	        shadeClose: true, //点击遮罩关闭
	        //area: ['300px', '200px'],
	        content: '操作成功弹出层',
	        btn: ['确定', '取消']
			  ,yes: function(index, layero){
			   	layer.msg('操作成功弹出层', {
			   		icon: 2,   //1-info;2-success;3-warning;4-error
			   		offset: 'rb',
			   		skin: "skinsuccesscss"
			   	});
			   	layer.close(index);  //回调关闭
			  },btn2: function(){ 
			  }
	    });
	});
	
	//警告
	$(".warningBtn").on("click", function() {
		layer.open({
	        type: 1,
	        title: "提示",
	        skin: "skinwarningcss",
	        shadeClose: true, //点击遮罩关闭
	        //area: ['300px', '200px'],
	        content: '警告弹出层',
	        btn: ['确定', '取消']
			  ,yes: function(index, layero){
			   	layer.msg('警告弹出层', {
			   		icon: 3,   //1-info;2-success;3-warning;4-erro
			   		offset: 'rb',
			   		skin: "skinwarningcss"
			   	});
			   	layer.close(index);  //回调关闭
			  },btn2: function(){ 
			  }
	    });
	});
	
	//危险
	$(".dangerBtn").on("click", function() {
		layer.open({
	        type: 1,
	        title: "提示",
	        skin: "skindangercss",
	        shadeClose: true, //点击遮罩关闭
	        //area: ['300px', '200px'],
	        content: '危险弹出层',
	        btn: ['确定', '取消']
			  ,yes: function(index, layero){
			   	layer.msg('危险弹出层', {
			   		icon: 4,   //1-info;2-success;3-warning;4-erro
			   		offset: 'rb',
			   		skin: "skindangercss"
			   	});
			   	layer.close(index);  //回调关闭
			  },btn2: function(){ 
			  }
	    });
	});
});